package com.tocean.demo.dto;

import lombok.Getter;
import lombok.Setter;

import java.util.LinkedList;
import java.util.List;

@Getter
@Setter
public class TagTreeNode {
    String tagId;
    String tagValue;
    List<TagTreeNode> children;
    public TagTreeNode(Long tagId,String tagValue,List<TagTreeNode> tagTreeNodes){
        this.tagId=Long.toString(tagId);
        this.tagValue=tagValue;
        this.children= new LinkedList<>();
        this.children = tagTreeNodes;
    }

    public TagTreeNode addChild(TagTreeNode child){
        children.add(child);
        return this;
    }

    public TagTreeNode(){}

}